package com.joker.microstoremanager.context;

import com.joker.microstoremanager.model.MicroShop;
import org.springframework.security.core.context.SecurityContextHolder;

public class UserContext {
    public static MicroShop getUser(){
        return (MicroShop) SecurityContextHolder.getContext()
                .getAuthentication()
                .getPrincipal();
    }
}
